package cn.lutu.protocol.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("t_user")
public class User implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String userName;
    private String password;
    private String nickName;
    private Integer age;
    private String email;
    private String gender;
    private String phone;
    private String imgUrl;
    @TableField(fill = FieldFill.INSERT)
    private Integer points;

    @TableField(fill = FieldFill.INSERT,value = "create_time")
    @JsonFormat(pattern = "yyyy年MM月dd日 HH时mm分ss秒",timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE ,value = "update_time")
    @JsonFormat(pattern = "yyyy年MM月dd日 HH时mm分ss秒",timezone = "GMT+8")
    private LocalDateTime updateTime;


}
